﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="StocksInfo.ascx.cs"
    Inherits="TCKQKL.FrontEnd.Web.Controls.StocksInfo" %>
<%@ Import Namespace="TCKQKL.FrontEnd.DataModel" %>
<%@ Import Namespace="TCKQKL.FrontEnd.Config" %>
<link href="../styles/data.css" rel="stylesheet" type="text/css" />
<% if (holding != null)
   {%>
<table class="data" style="border: none; width: 170px;">
    <% if (holding.Count > 0)
       {%>
    <tr>
        <th colspan="4" style="text-align: left; padding-left: 5px">
            TÀI KHOẢN CỔ PHIẾU
        </th>
    </tr>
    <tr>
        <td>
            MCK
        </td>
        <td style="text-align: right">
            GD
        </td>
        <td style="text-align: right">
            Chờ
        </td>
        <td style="text-align: right">
            Bán
        </td>
    </tr>
    <%for (int i = 0; i < holding.Count; i++)
      { %>
    <tr>
        <td>
            <div style="font-weight: bold;" title="<%=holding[i].stockName%>">
                <%=holding[i].stockId%></div>
        </td>
        <td class="InnerData">
            <%=holding[i].tradingAmount.ToString("N0")%>
        </td>
        <td class="InnerData">
            <%=holding[i].nettingAmount.ToString("N0")%>
        </td>
        <%--        <td class="InnerData" style="text-align: right">
            <%= (holding[i].AverageBought < holding[i].Quotes.Closed)?
           "<span style=\"color: green;\">" + holding[i].AverageBought.ToString("N1")
                       + "▲" + (holding[i].Quotes.Closed - holding[i].AverageBought).ToString("N1") 
                       + "</span>"
    :"<span style=\"color: red;\">"+holding[i].AverageBought.ToString("N1")
                       + "▼" + (holding[i].Quotes.Closed - holding[i].AverageBought).ToString("N1")
                       + "</span>"%>
        </td>
--%>
        <td class="InnerData" style="text-align: right">
            <%=holding[i].lockedAmount.ToString("N0")%>
        </td>
    </tr>
    <%}%>
    <%}%>
</table>
<%}%>